package com.share.device;

import com.share.device.service.IStationService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class DataInitializationRunner implements CommandLineRunner {

    private final IStationService stationService;

    public DataInitializationRunner(IStationService stationService) {
        this.stationService = stationService;
    }

    @Override
    public void run(String... args) throws Exception {
        stationService.updateData();
    }
}